package com.online.questionnaire.service;

import com.online.questionnaire.model.User;
import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.servlet.http.HttpServletRequest;

/**
* @description 针对表【user(用户)】的数据库操作Service
* @createDate 2024-11-27 14:23:44
*/
public interface UserService extends IService<User> {

    /**
     * 用户注册
     * @param user 用户信息
     * @return userId
     */
    int register(User user);

    /**
     * 用户登录
     * @param user 用户信息
     * @return User
     */
    User login(User user);

    boolean userIsLogin(HttpServletRequest request);

    User getLoginUser(HttpServletRequest request);

    String getUserNameById(Long userId);
}
